<template>
  <div>
    <a-form :model="props.detailData" name="edit-form" :label-col="{ span: 4 }" :wrapper-col="{ span: 16 }"
      autocomplete="off">
      <br>
      <a-form-item label="邮箱">
        {{ props.detailData.email }}
      </a-form-item>
      <a-form-item label="手机">
        {{ props.detailData.mobile }}
      </a-form-item>
      <a-form-item label="昵称" disabled>
        {{ props.detailData.nickname }}
      </a-form-item>
      <a-form-item label="头像" disabled>
        <a-image :width="50" :previewMask="false" :src="imgDomainUrl + props.detailData.avatar"
          style="border-radius: 50%;" />
      </a-form-item>
      <a-form-item label="累计捐款次数">
        {{ props.detailData.donation_times }}
      </a-form-item>
      <a-form-item label="累计捐款金额">
        {{ props.detailData.donation_amount }}
      </a-form-item>
      <a-form-item label="状态">
        <span style="color: red;" v-if="props.detailData.status === 2 || props.detailData.status === 3">{{ props.detailData.status_text }}</span>
        <span style="color: blue;" v-else-if="props.detailData.status === 4">{{ props.detailData.status_text }}</span>
        <span v-else>{{ props.detailData.status_text }}</span>
      </a-form-item>
      <a-form-item label="注册日期">
        {{ props.detailData.add_date }}
      </a-form-item>
      <a-form-item label="注册时间">
        {{ props.detailData.create_time }}
      </a-form-item>
    </a-form>
  </div>
</template>

<script setup>
import { inject } from 'vue';
const { imgDomainUrl } = inject('imgDomainUrl');  // 依赖注入--文件、图片前的域名
const props = defineProps(['detailData']);  // 接收父组件传参
</script>

<style scoped></style>